package com.cib.process.chat.core.handler.impl;

import com.cib.process.bean.CheckType;
import com.cib.process.bean.ServiceResult;
import com.cib.process.chat.bean.CustSvcResult;
import com.cib.process.chat.bean.PlayType;
import com.cib.process.chat.bean.QueryResult;
import com.cib.process.chat.core.handler.ActionHandler;
import org.springframework.stereotype.Service;

/**
 * 1007人工指令处理
 */
@Service
public class CustSvcActionHandler implements ActionHandler {
    @Override
    public ServiceResult execute(QueryResult queryResult) {
        CustSvcResult svcResult=new CustSvcResult();
        svcResult.setYwlx(queryResult.getYwlx());
        svcResult.setCertification(queryResult.getId_card());   //身份证号码
        svcResult.setCredit_card_id(queryResult.getCreditId()); //信用卡卡号
        svcResult.setCredit_card_certified(queryResult.getIsCertifiedCardPwd());    //验密
        svcResult.setType(PlayType.TTS);
        svcResult.setContext(queryResult.getSuggestAnswer());
        svcResult.setCanbreak(CheckType.N.name());
        svcResult.setIntentId(queryResult.getIntentid());
        return ServiceResult.buildSuccessResult(svcResult,queryResult.getSessionId(),queryResult.getAction());
    }
}
